﻿using PoemGame.Domain.GameAggregate;

namespace PoemGame.ApplicationService
{
    public enum EnumGameCreateFaultReason
    {
        None,
        PlayerIsNull,
        WrongParameter
    }
    /// <summary>
    /// 游戏创建结果
    /// </summary>
    public class GameCreationResult 
    {
        /// <summary>
        /// 创建的游戏
        /// </summary>
        public Game? CreatedGame { get; }

        public bool IsSuccess { get; set; }

        public string Message { get; set; }

        public EnumGameCreateFaultReason FaultReason { get; set; }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="game"></param>
        /// <param name="issuccess"></param>
        /// <param name="reason"></param>
        /// <param name="message"></param>
        public GameCreationResult(Game? game, bool issuccess, EnumGameCreateFaultReason reason, string message)
        {
            CreatedGame = game;
            IsSuccess = issuccess;
            FaultReason = reason;
            Message = message;
        }
    }
}
